
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">

<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Manage User</title>
    </head>
    <body>
        <jsp:include page="adminHeader.jsp"/>
        <table border="2">
            <thead>
                <tr>
                    <th>UserID</th>
                    <th>Name</th>
                    <th>Password</th>
                    <th>Email</th>
                    <th>Male</th>
                    <th>Birthday</th>
                    <th>Phone</th>
                    <th>Height</th>
                    <th>Weight</th>
                    <th>Role</th>
                    <th></th>
                </tr>
            </thead>
            <c:forEach var="user" items="${sessionScope.resultUser}">
                <tbody>
                    <form action="ControllerServlet" method="POST">
                    <tr>
                        <td>${user.userID}</td>
                        <td>${user.name}</td>
                        <td>${user.password}</td>
                        <td>${user.email}</td>
                        <td>${user.male}</td>
                        <td>${user.birthday}</td>
                        <td>${user.phone}</td>
                        <td>${user.height}</td>
                        <td>${user.weight}</td>
                        <td>${user.role}</td>
                        <td><a href="${updateUser}">Update</a></td>
                        <td>
                            <input type="hidden" name="deleteValue" value="${user.userID}" />
                            <input type="submit" value="deleteUser" name="btnAction" />
                        </td>

                    </tr>
                    </form>
                </tbody>
            </c:forEach>

        </table>
        <form action="ControllerServlet" method="POST">
            Name <input type="text" name="txtUserName" value="" /><br>
            <input type="submit" value="Show" name="btnAction" />
            <input type="submit" value="SearchUser" name="btnAction" />
            <input type="submit" value="Delete" name="btnAction" />
        </form>
    </body>
</html>

